<html>
<head>
<META HTTP-EQUIV="Content-Type" content="text/html; charset=UTF-8">
<title>表示提供网络传输服务的组件接口 - COM组件参考</title>
<link rel="stylesheet" type="text/css" href="comdoc.css"/>
</head>
<body>
<h1>Discoverx2.MessageChannel</h1>
<h2>可收发消息的组件</h2>
<hr/>
<h3>属性:<h3>
<table class="comobjmembers" cellspacing="0" cellpadding="2">
<colgroup><col width="30%"/><col width=""/></colgroup>
<tr class="head"><td>属性名</td><td>属性说明</td></tr>
<tr class="memberitemodd"><td>onreceived</td><td>获取或设置消息接收完成事件处理函数。</td></tr>
<tr class="memberitemeven"><td>onsent</td><td>获取或设置消息发送状态变更事件处理函数。</td></tr>
<tr class="memberitemodd"><td>onerr</td><td>获取或设置错误事件处理函数。</td></tr>
</table>
<h3>方法:</h3>
<table class="comobjmembers" cellspacing="0" cellpadding="2">
<colgroup><col width="30%"/><col width=""/></colgroup>
<tr class="head"><td>方法签名</td><td>方法说明</td></tr>
<tr class="memberitemodd"><td>SendMessage<div class="methodparam">参数1:msg(文本)</div><div class="methodparam">参数2:dest(文本)</div><div class="methodparam">返回:无符号整数</div></td><td>发送指定的即时消息内容(msg)到目标地址(dest)，返回发送被内容对应的消息id。</td></tr>
<tr class="memberitemeven"><td>ReceiveMessage<div class="methodparam">参数1:msg(文本)</div><div class="methodparam">参数2:msgId(无符号整数)</div><div class="methodparam">参数3:src(文本)</div><div class="methodparam">参数4:dt(文本)</div><div class="methodparam">参数5:msgType(整数),默认值:0</div></td><td>接收到一条消息。</td></tr>
<tr class="memberitemodd"><td>ReceiveSendStatus<div class="methodparam">参数1:statusCode(整数)</div><div class="methodparam">参数2:msgId(无符号整数)</div><div class="methodparam">参数3:dest(文本)</div></td><td>接收到一条发送状态信息。</td></tr>
<tr class="memberitemeven"><td>ReceiveError<div class="methodparam">参数1:errCode(整数)</div><div class="methodparam">参数2:errDesc(文本),默认值:</div></td><td>接收到一条错误信息。</td></tr>
<tr class="memberitemodd"><td>Dispose<div class="methodparam">返回:布尔</div></td><td>卸载消息组件接口，只能在持有此对象的对象结束时调用！</td></tr>
<tr class="memberitemeven"><td>SendFile<div class="methodparam">参数1:fn(文本)</div><div class="methodparam">参数2:dest(文本)</div><div class="methodparam">返回:无符号整数</div></td><td>发送文件名指定的文件内容(fn)到目标地址(dest)，返回发送被内容对应的消息id。</td></tr>
</table>
</body>
</html>